#include <bits/stdc++.h>
 
using namespace std;
 
int main() {
    int n1;
    cin >> n1;
 
    int arr1[n1];
    for (int i = 0; i < n1; i++) cin >> arr1[i];
 
    int n2;
    cin >> n2;
 
    int arr2[n2];
    for (int i = 0; i < n2; i++) cin >> arr2[i];
 
    int k;
    cin >> k;
 
    vector<int> pairs;
 
    for (const auto &v1: arr1) {
        for (const auto &v2: arr2) {
            pairs.emplace_back(v1 + v2);
        }
    }
 
    sort(pairs.begin(), pairs.end());
 
    cout << accumulate(pairs.begin(), pairs.begin() + k, 0) << endl;
 
    return 0;
}